package com.moyang.learn.alibabasentinel.rest;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * 测试sentinelResource注解
 *
 * @author fangjiaxiaobai@163.com
 * @since 2019-06-10
 */
@RestController
public class TestController {

    /**
     *
     * @param name 参数
     * @return hi+name
     */
    @SentinelResource(value = "hi")
    @GetMapping(value = "hi/{name}")
    public String hi(@PathVariable String name) {
        return "hi" + name;
    }


}
